<?php
defined("VALIDASI") or die ('Tidak diperkaenankan mengakses file ini secara langsung !');
if($_SESSION[level]=='sales'){
//QUERY
$sql_tbltransaksi=mysql_query("select * from v_laporan_penjualan WHERE TglTransaksi='$tgl_transaksi' order by IDTransaksi desc") or die
(mysql_error());
?>
<table align="center" class="table"><tr>
<th width="20"><b>No.</b></th>
<th width="300"><b>Barang</th>
<th>Supplier</th>
<th width="20">Keterangan</th>
<th>Harga</th>
<th colspan="2">Jumlah</th></tr>
<?php
while($baris_tbltransaksi=mysql_fetch_array($sql_tbltransaksi)){$no++;
if($n==0) {$warna="";$n++;} else {$warna="#dedee";$n--;}
?>
<tr valign="tp" bgcolor="$warna">
<td align=center><?php echo $no; ?>.</td>
<td><?php echo $baris_tbltransaksi[IDBarang]."-".$baris_tbltransaksi[NamaBrg]; ?></td>
<td><?php echo $baris_tbltransaksi[NamaSupplier]; ?></td>
<td align="center"><?php echo $baris_tbltransaksi[Keterangan]; ?></td>
<td>Rp. <?php echo str_replace(",",".",number_format($baris_tbltransaksi[Harga],0));?></td>
<td align="center"><?php echo $baris_tbltransaksi[Jumlah]; ?></td>
<td width="20"><a href="index.php?file=penjualan_hapus&id=<?php echo $baris_tbltransaksi[IDTransaksi]; ?>"><img src="./image/delete.png" width=100% title="Delete"></a></td></tr>
<?php
}
?>
</table><br>
<?php } else {
echo"Maaf Akses Ditolak! Anda LOGIN Sebagai $_SESSION[level]";}
?>